package com.yuren.codecrushlearn.Q5100;

import com.yuren.codecrushlearn.entities.Order;

import java.util.Comparator;
import java.util.List;

/**
 * Created with Intellij IDEA.
 * Description:
 *
 * @author Sleepy Code Tom
 * @date 2025-04-12 23:40
 */
public class Q5156 {

    /**
     * 对订单列表进行排序(LAMBDAS表达式熟练度)
     * @param orders
     * @param n
     */
    public void sort(List<Order> orders, int n) {
        orders.sort(Comparator.comparingInt(o -> o.price));
        orders.sort(Comparator.comparingInt(o -> o.createTime));
    }

}
